package com.hse.gui.ClientComponents;

import com.hse.gui.IClientComponent;

import javax.swing.*;

/**
 * Created by IntelliJ IDEA.
 * User: Nosov Alexander
 * Date: 02.06.2009
 * Time: 13:23:23
 * To change this template use File | Settings | File Templates.
 */
public class TempSensorComponent extends JLabel implements IClientComponent {
    String currentTemperatureString;

    public TempSensorComponent() {
        setText("No data");
    }

    public void recv(byte[] data) {

        currentTemperatureString = new String(data);
        setText(currentTemperatureString);
    }

    public byte[] send() {
        return null;
    }

    @Override
    public String toString() {
        return "Temperature Sensore";
    }
}
